package com.apobates.jforum2.troll.accounts.stub.vo;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
/**
 *
 * @author xiaofanku
 */
public class MemberVo implements Serializable{
    //会员ID
    private long id;
    //注册日期
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime entryDateTime;
    //状态
    private int status;
    private String statusTitle;
    //组
    private int group;
    private String groupTitle;
    //角色
    private int role;
    private String roleTitle;
    //头像地址
    private String avatar;
    //签名
    private String signature;
    //昵称
    private String nickname;
    //登录帐号
    private String names;
    //style
    private String style;

    public MemberVo(){}

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public LocalDateTime getEntryDateTime() {
        return entryDateTime;
    }

    public void setEntryDateTime(LocalDateTime entryDateTime) {
        this.entryDateTime = entryDateTime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getGroup() {
        return group;
    }

    public void setGroup(int group) {
        this.group = group;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getNames() {
        return names;
    }

    public void setNames(String names) {
        this.names = names;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    public String getGroupTitle() {
        return groupTitle;
    }

    public void setGroupTitle(String groupTitle) {
        this.groupTitle = groupTitle;
    }

    public String getRoleTitle() {
        return roleTitle;
    }

    public void setRoleTitle(String roleTitle) {
        this.roleTitle = roleTitle;
    }

    public String getStatusTitle() {
        return statusTitle;
    }

    public void setStatusTitle(String statusTitle) {
        this.statusTitle = statusTitle;
    }
    public static MemberVo empty(){
        MemberVo mv = new MemberVo();
        mv.setId(0L);
        //状态
        mv.setStatus(4);
        mv.setStatusTitle("");
        //组
        mv.setGroup(0);
        mv.setGroupTitle("游客");
        //角色
        mv.setRole(1);
        mv.setRoleTitle("无");
        //头像地址
        mv.setAvatar("avtar://local/empty.png");
        //签名
        mv.setSignature("I am a leaf on the wind");
        //昵称
        mv.setNickname("Guest");
        //登录帐号
        mv.setNames("*");
        //style
        mv.setStyle("guest");
        return mv;
    }
}